<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>07_字符串方法-startsWith-endsWith</title>
    </head>
    <body>
        <script>
            // (15) startsWith
            // 以谁谁为开头
            // 返回值一个boolean类型的数据
            // var str15 = 'hello';

            // console.log(str15.startsWith('h'));
            // console.log(str15.startsWith('he'));
            // console.log(str15.startsWith('heo'));

            // (16) endsWith
            // 以谁谁谁为结束
            var str16 = 'hello';

            console.log(str16.endsWith('o'));
            console.log(str16.endsWith('hello'));
        </script>
    </body>
</html>